package smart.rpc.exception;

/**
 * Created By gao_e on 2020/3/8 10:12
 */
public class SmartRPCException extends RuntimeException {

    private String errorMsg;
    private Integer code;

    public SmartRPCException() {
        super();
    }

    public SmartRPCException(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public SmartRPCException(String errorMsg, Integer code) {
        this.errorMsg = errorMsg;
        this.code = code;
    }

    public SmartRPCException(String message, String errorMsg, Integer code) {
        super(message);
        this.errorMsg = errorMsg;
        this.code = code;
    }

    public SmartRPCException(String message, Throwable cause, String errorMsg, Integer code) {
        super(message, cause);
        this.errorMsg = errorMsg;
        this.code = code;
    }

    public SmartRPCException(Throwable cause, String errorMsg, Integer code) {
        super(cause);
        this.errorMsg = errorMsg;
        this.code = code;
    }

    public SmartRPCException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, String errorMsg, Integer code) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorMsg = errorMsg;
        this.code = code;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
